﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.ServiceProcess;
using System.Text;
using System.ServiceModel;

namespace Zen4SyncTestServerHost
{
    public partial class Zen4SyncTestServerHost : ServiceBase
    {
        private ServiceHost zen4SyncTestServerServicesHost = null;

        public Zen4SyncTestServerHost()
        {
            InitializeComponent();
        }
        
        protected override void OnStart(string[] args)
        {
            // Start the host for the Zen4SyncTestServer
            zen4SyncTestServerServicesHost = new ServiceHost(typeof(Zen4SyncTestServer.TestServerServices));
            zen4SyncTestServerServicesHost.Open();
        }

        protected override void OnStop()
        {
            // Close the host for the Zen4SyncTestServer
            if (zen4SyncTestServerServicesHost != null)
            { 
                zen4SyncTestServerServicesHost.Close();
            }
        }
    }
}
